package rm.mk;

import java.util.List;

import rm.mk.data.City;
import rm.mk.interfaces.IAlgorithm;

public abstract class AbstractFinder implements IAlgorithm {

	List<City> cities;
	
	public AbstractFinder(List<City> cities){
		this.cities = cities;
	}
	
	protected City selectCity(int nr)
	{
		for(City cc : cities)
			if(cc.getCityNr() == nr)
				return cc;
			
			return null;
	}
}
